//
//  ViewController.m
//  UI_Homework_06
//
//  Created by 黄威 on 16/5/10.
//  Copyright © 2016年 黄威. All rights reserved.
//

#import "ViewController.h"
#import "Callview.h"
@interface ViewController ()
@property (nonatomic, retain)UIScrollView *scrollview;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
   self.scrollview = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, 375, 675)];
    
    self.scrollview.contentSize = CGSizeMake(self.view.frame.size.width, self.view.frame.size.height * 2);
    self.scrollview.indicatorStyle =  UIScrollViewIndicatorStyleWhite;
    [self.view addSubview:self.scrollview];
    [_scrollview release];
    
    Callview *call1 = [[Callview alloc]init];
    call1.frame = CGRectMake(0, 0,self.view.frame.size.width,150);
    call1.nameOfLabel.text = @"王尼玛";
    
    call1.phoneOfLaber.text = @"123456789";

    call1.imageView.image = [UIImage imageNamed:@"1.jpg"];
    [self.scrollview addSubview:call1];

    Callview *call2 = [[Callview alloc]init];
    call2.frame = CGRectMake(0, 160,self.view.frame.size.width,150);
    call2.nameOfLabel.text = @"隔壁老王";
    call2.phoneOfLaber.text = @"123456789";
    call2.imageView.image = [UIImage imageNamed:@"2.jpg"];
     [self.scrollview addSubview:call2];

    Callview *call3 = [[Callview alloc]init];
    call3.frame = CGRectMake(0, 330,self.view.frame.size.width,150);
    call3.nameOfLabel.text = @"隔壁老王的隔壁";
    call3.phoneOfLaber.text = @"123456789";
    call3.imageView.image = [UIImage imageNamed:@"3.jpg"];
  [self.scrollview addSubview:call3];
    
    Callview *call4 = [[Callview alloc]init];
    call4.frame = CGRectMake(0, 490,self.view.frame.size.width,150);
    call4.nameOfLabel.text = @"隔壁老王隔壁的隔壁老王";
    call4.phoneOfLaber.text = @"123456789";
    call4.imageView.image = [UIImage imageNamed:@"4.jpg"];
   [self.scrollview addSubview:call4];
    
    Callview *call5 = [[Callview alloc]init];
    call5.frame = CGRectMake(0, 650,self.view.frame.size.width,150);
    call5.nameOfLabel.text = @"隔壁老王的隔壁的隔壁的隔壁老王";
    call5.phoneOfLaber.text = @"123456789";
    call5.imageView.image = [UIImage imageNamed:@"5.jpg"];
  [self.scrollview addSubview:call5];
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
